Language agnostic smart contract execution on a blockchain

ABSTRACT

A method for providing a language agnostic contract execution on a blockchain is provided. The method includes providing a menu comprising multiple execution environments, and selecting, from a suite of virtual machine containers, a virtual machine container that runs an execution environment selected by the developer of the blockchain application. The method also includes enabling one or more functions in the virtual machine container to access a dedicated memory or a state variable in the block producer to run an action in the virtual machine container, the action provided by a server running the blockchain application, providing the action to the blockchain application in the virtual machine container, and writing an output from the action of the blockchain application to a secure ledger in a blockchain. A system and a non-transitory, computer-readable medium storing instructions to perform the above method are also provided.

CROSS REFERENCE TO RELATED APPLICATIONS

This present application claims the benefit of priority under 35 U.S.C.§ 120 as a continuation of U.S. patent application Ser. No. 17/335,912,filed Jun. 1, 2021, now allowed, which is a continuation of U.S. patentapplication Ser. No. 17/177,110, filed Feb. 16, 2021, now U.S. Pat. No.11,042,400, each of which is incorporated by reference in its entirety.

BACKGROUND Field

The present disclosure generally relates to a blockchain network thatprovides blockchain applications in a host selected according to alanguage of preference by the user. More specifically, the presentdisclosure relates to a blockchain network having the ability to providea virtual machine container configured to run a script in a languageselected by the user.

Description of the Related Art

Blockchain networks are widely used for ensuring secured and reliabledata transactions. However, typical smart contract writers use adedicated code language that is then translated into web assemblylanguage for execution of the blockchain application. When a given blockproducer operates in a code language that is not known to a developer,currently there is no option for the developer to translate the codefrom a familiar language to that used by the block producer.Effectively, this severely limits the number of users in a blockchainnetwork to only those who happen to be versed in the language of choiceby the block producer.

SUMMARY

In one embodiment of the present disclosure, a computer-implementedmethod is described for providing a language agnostic smart contractexecution in a blockchain. The computer-implemented method includesproviding, to a developer of a blockchain application accessed by ablock producer, a menu including multiple execution environments,selecting, from a suite of virtual machine containers, a virtual machinecontainer that runs an execution environment selected by the developerof the blockchain application from the menu, and enabling one or morefunctions in the virtual machine container to access a dedicated memoryor a state variable in the block producer to run an action in thevirtual machine container, the action provided by a server running theblockchain application. The computer-implemented method also includesproviding the action to the blockchain application in the virtualmachine container, and writing an output from the action of theblockchain application to a secure ledger in a blockchain.

According to one embodiment, a system is described that includes one ormore processors and a memory coupled with the one or more processors,the memory including instructions that, when executed by the one or moreprocessors, cause the one or more processors to provide, to a developerof a blockchain application accessed by a block producer, a menuincluding multiple execution environments. The one or more processorsalso execute instructions to select, from a suite of virtual machinecontainers, a virtual machine container that runs an executionenvironment selected by the developer of the blockchain application fromthe menu, and to enable one or more functions in the virtual machinecontainer to access a dedicated memory or a state variable in the blockproducer to run an action in the virtual machine container, the actionprovided by a server running the blockchain application. The one or moreprocessors also execute instructions to provide the action to theblockchain application in the virtual machine container, and to write anoutput from the action of the blockchain application to a secure ledgerin a blockchain, wherein providing a menu including multiple executionenvironments includes providing a menu including at least one of JVM,native, and C++ execution environments.

According to one embodiment, a non-transitory, machine-readable mediumis described that includes instructions, which when executed by one ormore processors, cause a computer to perform a method that includesproviding, to a developer of a blockchain application accessed by ablock producer, a menu including multiple execution environments, andselecting, from a suite of virtual machine containers, a virtual machinecontainer that runs an execution environment selected by the developerof the blockchain application from the menu. The method also includesenabling one or more functions in the virtual machine container toaccess a dedicated memory or a state variable in the block producer torun an action in the virtual machine container, the action provided by aserver running the blockchain application, providing the action to theblockchain application in the virtual machine container, and writing anoutput from the action of the blockchain application to a secure ledgerin a blockchain. Providing a menu including multiple executionenvironments includes providing a menu including at least one of JVM,native, and C++ execution environments, and providing a menu havingmultiple execution environments includes providing a menu including oneor more versions of a same execution environment.

In yet another embodiment, a system includes a first means for storinginstructions and a second means for executing the instructions to causethe system to perform a method, the method including providing, to adeveloper of a blockchain application accessed by a block producer, amenu including multiple execution environments, selecting, from a suiteof virtual machine containers, a virtual machine container that runs anexecution environment selected by the developer of the blockchainapplication from the menu, and enabling one or more functions in thevirtual machine container to access a dedicated memory or a statevariable in the block producer to run an action in the virtual machinecontainer, the action provided by a server running the blockchainapplication. The method also includes providing the action to theblockchain application in the virtual machine container, and writing anoutput from the action of the blockchain application to a secure ledgerin a blockchain.

It is understood that other configurations of the subject technologywill become readily apparent to those skilled in the art from thefollowing detailed description, wherein various configurations of thesubject technology are shown and described by way of illustration. Aswill be realized, the subject technology is capable of other anddifferent configurations and its several details are capable ofmodification in various other respects, all without departing from thescope of the subject technology. Accordingly, the drawings and detaileddescription are to be regarded as illustrative in nature and not asrestrictive.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are included to provide furtherunderstanding and are incorporated in and constitute a part of thisspecification, illustrate disclosed embodiments and together with thedescription serve to explain the principles of the disclosedembodiments. In the drawings:

FIG. 1 illustrates an example architecture suitable for fast access to adata resource update in a blockchain network, according to someembodiments.

FIG. 2 is a block diagram illustrating an example server and client fromthe architecture of FIG. 1 , according to certain aspects of thedisclosure.

FIG. 3 illustrates a language agnostic blockchain network, according tosome embodiments.

FIG. 4 is a flow chart illustrating steps in a method for providing alanguage agnostic smart contract execution on a blockchain, according tosome embodiments.

FIG. 5 is a block diagram illustrating an example computer system withwhich the client and server of FIGS. 1 and 2 and the method of FIG. 4can be implemented.

In the figures, elements and steps denoted by the same or similarreference numerals are associated with the same or similar elements andsteps, unless indicated otherwise.

DETAILED DESCRIPTION

In the following detailed description, numerous specific details are setforth to provide a full understanding of the present disclosure. It willbe apparent, however, to one ordinarily skilled in the art, thatembodiments of the present disclosure may be practiced without some ofthese specific details. In other instances, well-known structures andtechniques have not been shown in detail so as not to obscure thedisclosure.

General Overview

Blockchain networks are becoming more popular in the world of computernetworking systems due to the simplicity and visibility of blockchainledgers and the data security provided by the encryption scheme. In someinstances, developers that create and provide a blockchain applicationto be used by a server that is part of a blockchain network mayencounter the problem of language incompatibility between their ownapplication tools and those of the server that will be hosting theapplication. Typically, developers have to rely on their knowledge ofmultiple languages that many servers use to run the code provided by thedevelopers. Moreover, in some situations a developer may need knowledgeof the web assembly language running on most virtual machines that hostapplication programming interfaces (APIs). Some of the languages thatdevelopers and VMs may use include JVM (Javascript VM and the like),native, C++, and the like, including one or more different versions andupdates thereof. Moreover, some of the languages and executionenvironments may include any one of the following: Python, PERL GO, DartVM, EVM (Ethereum Virtual Machine), Linux, and the like.

However, as blockchain networks continue to expand their applicationscope and breadth, the universe of developers entering the market willgrow concomitantly, and it is not a given that the language used bydevelopers will be the same as that used in the virtual machines of theservers hosting the applications. Currently, there is no palliativesolution to the above problem, other than simply having to manuallyrewrite code from the developer into the appropriate language in theserver. This is a hindrance that, among other problems, acts as an entrybarrier for new developers and new applications into the world ofblockchain networks.

The disclosed system addresses this problem specifically arising in therealm of computer technology by providing a solution also rooted incomputer technology, namely, offering to the developer a menu oflanguage options to select from, and accessing a specific VM containerthat runs on the selected language option. Accordingly, embodiments asdisclosed herein provide application developers a platform that islanguage agnostic and accommodates to their needs and expertise.

The subject system provides several advantages, including optimizing thetime and effort employed by a developer to create and update anapplication for a blockchain network. This results in a better usage ofserver time and VM time, and enables a service provider to use multipledevelopers working on different VM containers (configured on differentlanguages) at the same time, thus freeing up server time and bandwidth,and reducing time-to-completion of projects in the blockchain network.

Example System Architecture

FIG. 1 illustrates an example architecture 100 for a blockchain networksuitable for practicing some implementations of the disclosure.Architecture 100 includes servers 130 and client devices 110 coupledover a network 150. One of the many servers 130 is configured to host amemory, including instructions which, when executed by a processor,cause the server 130 to perform at least some of the steps in methods asdisclosed herein. In some embodiments, architecture 100 is configured tostore data in a blockchain database 152. Blockchain database 152 may beaccessed by block producers in servers 130, and other authorized clientsof the blockchain network, who may be users of client devices 110.Servers 130 may also include service providers that collect data frommultiple sources to create an immutable register (e.g., a smartcontract) in blockchain database 152. Accordingly, service providers mayhost blockchain applications running in virtual machine containerswithin a block producer. In addition, servers 130 may includeinformation providers that collect time-sensitive information for theblockchain applications. In some embodiments, the information providermay be a reliable data source that uses a verifiable signature acrossthe blockchain network. The verifiable signature guarantees the identityof the data source and the trustworthiness of the data provided.

Servers 130 may include any device having an appropriate processor,memory, and communications capability for hosting and accessingblockchain database 152, and a virtual machine container to run ablockchain application. The blockchain application may be accessible byvarious clients 110 over network 150. In some embodiments, servers 130may include a signature verification tool configured to handle publicand private keys to access blockchain database 152. Client devices 110may include, for example, desktop computers, mobile computers, tabletcomputers (e.g., including e-book readers), mobile devices (e.g., asmartphone or PDA), or any other devices having appropriate processor,memory, and communications capabilities for accessing the blockchaintool in one or more of servers 130, and blockchain database 152. Network150 can include, for example, any one or more of a local area network(LAN), a wide area network (WAN), the Internet, and the like. Further,network 150 can include, but is not limited to, any one or more of thefollowing network topologies, including a bus network, a star network, aring network, a mesh network, a star-bus network, tree or hierarchicalnetwork, and the like.

FIG. 2 is a block diagram 200 illustrating an example server 130, clientdevice 110, and blockchain database 152 in the architecture 100 of FIG.1 , according to certain aspects of the disclosure. Client device 110and server 130 are communicatively coupled over network 150 viarespective communications modules 218-1 and 218-2 (hereinafter,collectively referred to as “communications modules 218”).Communications modules 218 are configured to interface with network 150to send and receive information, such as data, requests, responses, andcommands to other devices on the network. Communications modules 218 canbe, for example, modems, Ethernet cards, or any port that receivesinformation from an external device. Communications modules 218 mayinclude hardware and software to handle data encryption, and directaccess to a virtual machine container (e.g., an ‘action’ port for ablockchain application), or direct access to a low latency memorycircuit, such as a RAM circuit.

Client device 110 may be coupled with an input device 214 and with anoutput device 216. Input device 214 may include a keyboard, a mouse, apointer, or even a touch-screen display that a consumer may use tointeract with client device 110. Likewise, output device 216 may includea display and a speaker with which the consumer may retrieve resultsfrom client device 110. Client device 110 may also include a processor212-1, configured to execute instructions stored in a memory 220-1, andto cause client device 110 to perform at least some of the steps inmethods consistent with the present disclosure. Memory 220-1 may furtherinclude an application 222, including specific instructions which, whenexecuted by processor 212-1, cause a blockchain tool 242 from server 130to display information in output device 216. In that regard, application222 may include a smart contract application, or any other blockchainapplication as disclosed herein. Client device 110 may provide a datapacket 227-1 to server 130, via network 150. Likewise, server 130 mayprovide a data packet 227-2 to client device 110. Hereinafter, datapackets 227-1 and 227-2 will be referred to, collectively, as “datapackets 227.”

Server 130 includes a memory 220-2, a processor 212-2, andcommunications module 218-2. Processor 212-2 is configured to executeinstructions, such as instructions physically coded into processor212-2, instructions received from software in memory 220-2, or acombination of both. Memory 220-2 includes a virtual machine 240 whereina blockchain tool 242 is installed. Memory 220-2 may also include asignature verification tool 244 and a public-key validation tool 246,configured to validate, authenticate, and verify access from differentclient devices 110 and servers 130 to blockchain database 152.Accordingly, server 130 may verify and apply a signature to a data blockbefore storing in blockchain database 152. Hereinafter, processors 212-1and 212-2 will be collectively referred to as “processors 212,” andmemories 220-1 and 220-2 will be collectively referred to as “memories220.” In some embodiments, memories 220 may include low latencymemories, such as RAM (dynamic-RAM—DRAM—, or static RAM—SRAM—) that canbe accessed quickly from an external device via a plugin socket incommunications modules 218.

Data packets 227 may include time-sensitive information (e.g., timestamps and other metadata) and data value updates (e.g., stock marketprices, weather conditions, sensor measurements, and the like). In someembodiments, data packets 227 may include encryption data and passwords,such as public keys and private keys. Moreover, in some embodiments,data packets 227 may include data signed by an authorized client orserver in the blockchain network and already stored in memories 220. Insome embodiments, data packets 227 may include a “blob” with multiplepasswords, each password associated with a time-sensitive value. When adata packet or data update is accessed by a block producer in theblockchain network, it is saved as a signed/verified block 250 inblockchain database 152. In some embodiments, signed block 250 mayinclude other action results from other external client devices 110,including various signatures and mechanisms to make it cryptographicallysecure. Signed block 250 may then be sent from server 130 to other blockproducers or client devices where it could be re-run (using thedecrypted data) by a blockchain application.

FIG. 3 illustrates a language agnostic blockchain network 300, accordingto some embodiments. A developer using a client device 310 sets code fora blockchain application hosted by a server 330-1. Server 330-1 may hosta block producer that the developer is accessing to configure theblockchain application. A server 330-2 may be communicatively coupledwith server 330-1, and configured to provide access to blockchainnetwork 300 to any registered user, e.g., to access the blockchainapplication. The blockchain application may be any one of blockchainapplications 322-1, 322-2, or 322-3 (hereinafter, collectively referredto as “blockchain applications 322”). In some embodiments, at least oneof blockchain applications 322 may include a smart contract application,as disclosed herein. Each of blockchain applications 322 may be run onrespective virtual machine (VM) containers 340-1, 340-2, and 340-3(hereinafter, collectively referred to as “VM containers 340”).

Each one of VMs 340 may include a specialized software development kit(SDK) 318A, 318B, and 318C (hereinafter, collectively referred to as“SDKs 318”), respectively. Accordingly, each of VM containers 340 andSDKs 318 may be configured in a different code language (e.g., Java,C++, Perl, and the like). SDKs 318 access and update a state variable318-1 in server 330-1. Server 330-1 stores an encrypted block 350 in theblockchain database once a user of a service provided by server 330-2executes blockchain application 322. Accordingly, the developer withclient device 310 may select either one of VM containers 340 dependingon a language of choice. The block producer in server 330-1 directs theactions and codes from client device 310 to the VM container thatincludes the desired language.

In some embodiments, block producer in server 330-1 may be configured toautomatically identify a language used by the developer in client device310, and re-direct the developer to the appropriate VM container 340.For example, in some embodiments, server 330-1 may identify a string ofcharacters in a code script from client device 310 to automaticallydetect the language used by the developer. Some of the script that maybe presented to server 330-1 may include character strings as follows:

-   -   “ile        ./abieos/build_/CMakeFiles/test_abieos_reflect.dir/src/reflect_test.cpp.obj    -   ./abieos/build_/CMakeFiles/test_abieos_reflect.dir/src/reflect_test.cpp.obj:        Intel amd64 COFF object file, not stripped, 30 sections, symbol        offset=0x33e6, 87 symbols    -   iholsman @Book:/mnt/c/Users/ihols/src$    -   $ file./lib/JJIL-J2SE.ja./lib/JJIL-J2SE.jar: Java archive data        (JAR)”

Accordingly, server 330-1 may identify the sequence “lib/JJIL” or “JAR”as a JAVA script, and direct the developer to the appropriate VMcontainer 340. In some embodiments, a type of executable file (e.g., theappropriate execution environment for a developer code) can usually bedetermined by the first few bytes in the file (e.g., with a characterstring such as “#!<executable path>”). For example, a sequence including“50 4B 03 04 14 00 08 00 08 00” may represent a Java JAR file (whichwould then be passed to a Java VM). A sequence including “43 23 2B 44 A443 4D A5 48 64 72” may indicate a C++ execution environment. A sequenceincluding “7F 45 4C 46” may indicate a Linux executable environment.

FIG. 4 is a flow chart illustrating steps in a method 400 for providinga language agnostic smart contract execution on a blockchain, accordingto some embodiments. One or more of the steps in method 400 may be atleast partially performed by a processor executing commands stored in amemory, the processor and memory being part of a client device, aserver, or a blockchain database communicatively coupled with each othervia a network (e.g., processors 212, memories 220, client devices 110,servers 130, network 150, and blockchain database 152). In someembodiments, the memory may include a virtual machine having ablockchain tool hosting a blockchain application in the client device,and the server may be a block producer coupled to a blockchain database,as disclosed herein (e.g., virtual machine 240, blockchain tool 242, andblockchain database 152). The memory may also include an encryption toolhaving a signature verification tool and a public-key validation tool toverify access to the blockchain tool and the blockchain database toother servers and clients (e.g., signature verification tool 244,public-key validation tool 246). In some embodiments, methods consistentwith the present disclosure may include one or more steps from method400 performed in a different order, at the same time, simultaneously,quasi-simultaneously, or overlapping in time.

Step 402 includes providing, to a developer of a blockchain applicationaccessed by a block producer, a menu including multiple executionenvironments. In some embodiments, step 402 includes providing a menuwith at least one of JVM, native, and C++ execution environments. Insome embodiments, step 402 includes providing a menu including one ormore versions of a same execution environment.

Step 404 includes selecting, from a suite of virtual machine containers,a virtual machine container that runs an execution environment selectedby the developer of the blockchain application from the menu. In someembodiments, step 404 includes detecting the execution environment froma format of a header in a code script provided by the developer. In someembodiments, step 404 may include detecting in the code script from thedeveloper, a sequence including the characters “50 4B 03 04 14 00 08 0008 00” for a Java VM execution environment. Step 404 may includedetecting a sequence including “43 23 2B 44 A4 43 4D A5 48 64 72” toidentify a C++ execution environment. Step 404 may include detecting asequence including “7F 45 4C 46,” indicating a linux executableenvironment.

Step 406 includes enabling one or more functions in the virtual machinecontainer to access a dedicated memory or a state variable in the blockproducer to run an action in the virtual machine container, the actionprovided by a server running the blockchain application. In someembodiments, step 406 includes executing a software development kit toaccess the state variable and a library accessible to the developer ofthe blockchain application.

Step 408 includes providing the action to the blockchain application inthe virtual machine container. In some embodiments, step 408 includespreventing access to the blockchain application by a third party with asecurity feature in the virtual machine container.

Step 410 includes writing an output from the action of the blockchainapplication to a secure ledger in a blockchain.

Hardware Overview

FIG. 5 is a block diagram illustrating an example computer system 500with which the client and server of FIGS. 1 and 2 and the method of FIG.4 can be implemented. In certain aspects, the computer system 500 may beimplemented using hardware or a combination of software and hardware,either in a dedicated server, or integrated into another entity, ordistributed across multiple entities.

Computer system 500 (e.g., client device 110 and server 130) includes abus 508 or other communication mechanism for communicating information,and a processor 502 (e.g., processors 212) coupled with bus 508 forprocessing information. By way of example, the computer system 500 maybe implemented with one or more processors 502. Processor 502 may be ageneral-purpose microprocessor, a microcontroller, a Digital SignalProcessor (DSP), an Application Specific Integrated Circuit (ASIC), aField Programmable Gate Array (FPGA), a Programmable Logic Device (PLD),a controller, a state machine, gated logic, discrete hardwarecomponents, or any other suitable entity that can perform calculationsor other manipulations of information.

Computer system 500 can include, in addition to hardware, code thatcreates an execution environment for the computer program in question,e.g., code that constitutes processor firmware, a protocol stack, adatabase management system, an operating system, or a combination of oneor more of them stored in an included memory 504 (e.g., memories 220),such as a Random Access Memory (RAM), a flash memory, a Read-Only Memory(ROM), a Programmable Read-Only Memory (PROM), an Erasable PROM (EPROM),registers, a hard disk, a removable disk, a CD-ROM, a DVD, or any othersuitable storage device, coupled with bus 508 for storing informationand instructions to be executed by processor 502. The processor 502 andthe memory 504 can be supplemented by, or incorporated in, specialpurpose logic circuitry.

The instructions may be stored in the memory 504 and implemented in oneor more computer program products, e.g., one or more modules of computerprogram instructions encoded on a computer-readable medium for executionby, or to control the operation of, the computer system 500, andaccording to any method well known to those of skill in the art,including, but not limited to, computer languages such as data-orientedlanguages (e.g., SQL, dBase), system languages (e.g., C, Objective-C,C++, Assembly), architectural languages (e.g., Java, .NET), andapplication languages (e.g., PHP, Ruby, Perl, Python). Instructions mayalso be implemented in computer languages such as array languages,aspect-oriented languages, assembly languages, authoring languages,command line interface languages, compiled languages, concurrentlanguages, curly-bracket languages, dataflow languages, data-structuredlanguages, declarative languages, esoteric languages, extensionlanguages, fourth-generation languages, functional languages,interactive mode languages, interpreted languages, iterative languages,list-based languages, little languages, logic-based languages, machinelanguages, macro languages, metaprogramming languages, multiparadigmlanguages, numerical analysis, non-English-based languages,object-oriented class-based languages, object-oriented prototype-basedlanguages, off-side rule languages, procedural languages, reflectivelanguages, rule-based languages, scripting languages, stack-basedlanguages, synchronous languages, syntax handling languages, visuallanguages, wirth languages, and xml-based languages. Memory 504 may alsobe used for storing temporary variable or other intermediate informationduring execution of instructions to be executed by processor 502.

A computer program as discussed herein does not necessarily correspondto a file in a file system. A program can be stored in a portion of afile that holds other programs or data (e.g., one or more scripts storedin a markup language document), in a single file dedicated to theprogram in question, or in multiple coordinated files (e.g., files thatstore one or more modules, subprograms, or portions of code). A computerprogram can be deployed to be executed on one computer or on multiplecomputers that are located at one site or distributed across multiplesites and intercoupled by a communication network. The processes andlogic flows described in this specification can be performed by one ormore programmable processors executing one or more computer programs toperform functions by operating on input data and generating output.

Computer system 500 further includes a data storage device 506 such as amagnetic disk or optical disk, coupled with bus 508 for storinginformation and instructions. Computer system 500 may be coupled viainput/output module 510 to various devices. Input/output module 510 canbe any input/output module. Exemplary input/output modules 510 includedata ports such as USB ports. The input/output module 510 is configuredto connect to a communications module 512. Exemplary communicationsmodules 512 (e.g., communications modules 218) include networkinginterface cards, such as Ethernet cards and modems. In certain aspects,input/output module 510 is configured to connect to a plurality ofdevices, such as an input device 514 (e.g., input device 214) and/or anoutput device 516 (e.g., output device 216). Exemplary input devices 514include a keyboard and a pointing device, e.g., a mouse or a trackball,by which a consumer can provide input to the computer system 500. Otherkinds of input devices 514 can be used to provide for interaction with aconsumer as well, such as a tactile input device, visual input device,audio input device, or brain-computer interface device. For example,feedback provided to the consumer can be any form of sensory feedback,e.g., visual feedback, auditory feedback, or tactile feedback; and inputfrom the consumer can be received in any form, including acoustic,speech, tactile, or brain wave input. Exemplary output devices 516include display devices, such as an LCD (liquid crystal display)monitor, for displaying information to the consumer.

According to one aspect of the present disclosure, the client device 110and server 130 can be implemented using a computer system 500 inresponse to processor 502 executing one or more sequences of one or moreinstructions contained in memory 504. Such instructions may be read intomemory 504 from another machine-readable medium, such as data storagedevice 506. Execution of the sequences of instructions contained in mainmemory 504 causes processor 502 to perform the process steps describedherein. One or more processors in a multi-processing arrangement mayalso be employed to execute the sequences of instructions contained inmemory 504. In alternative aspects, hard-wired circuitry may be used inplace of or in combination with software instructions to implementvarious aspects of the present disclosure. Thus, aspects of the presentdisclosure are not limited to any specific combination of hardwarecircuitry and software.

Various aspects of the subject matter described in this specificationcan be implemented in a computing system that includes a back endcomponent, e.g., a data server, or that includes a middleware component,e.g., an application server, or that includes a front end component,e.g., a client computer having a graphical consumer interface or a Webbrowser through which a consumer can interact with an implementation ofthe subject matter described in this specification, or any combinationof one or more such back end, middleware, or front end components. Thecomponents of the system can be intercoupled by any form or medium ofdigital data communication, e.g., a communication network. Thecommunication network (e.g., network 150) can include, for example, anyone or more of a LAN, a WAN, the Internet, and the like. Further, thecommunication network can include, but is not limited to, for example,any one or more of the following network topologies, including a busnetwork, a star network, a ring network, a mesh network, a star-busnetwork, tree or hierarchical network, or the like. The communicationsmodules can be, for example, modems or Ethernet cards.

Computer system 500 can include clients and servers. A client and serverare generally remote from each other and typically interact through acommunication network. The relationship of client and server arises byvirtue of computer programs running on the respective computers andhaving a client-server relationship to each other. Computer system 500can be, for example, and without limitation, a desktop computer, laptopcomputer, or tablet computer. Computer system 500 can also be embeddedin another device, for example, and without limitation, a mobiletelephone, a PDA, a mobile audio player, a Global Positioning System(GPS) receiver, a video game console, and/or a television set top box.

The term “machine-readable storage medium” or “computer-readable medium”as used herein refers to any medium or media that participates inproviding instructions to processor 502 for execution. Such a medium maytake many forms, including, but not limited to, non-volatile media,volatile media, and transmission media. Non-volatile media include, forexample, optical or magnetic disks, such as data storage device 506.Volatile media include dynamic memory, such as memory 504. Transmissionmedia include coaxial cables, copper wire, and fiber optics, includingthe wires forming bus 508. Common forms of machine-readable mediainclude, for example, floppy disk, a flexible disk, hard disk, magnetictape, any other magnetic medium, a CD-ROM, DVD, any other opticalmedium, punch cards, paper tape, any other physical medium with patternsof holes, a RAM, a PROM, an EPROM, a FLASH EPROM, any other memory chipor cartridge, or any other medium from which a computer can read. Themachine-readable storage medium can be a machine-readable storagedevice, a machine-readable storage substrate, a memory device, acomposition of matter affecting a machine-readable propagated signal, ora combination of one or more of them.

To illustrate the interchangeability of hardware and software, itemssuch as the various illustrative blocks, modules, components, methods,operations, instructions, and algorithms have been described generallyin terms of their functionality. Whether such functionality isimplemented as hardware, software, or a combination of hardware andsoftware depends upon the particular application and design constraintsimposed on the overall system. Skilled artisans may implement thedescribed functionality in varying ways for each particular application.

As used herein, the phrase “at least one of” preceding a series ofitems, with the terms “and” or “or” to separate any of the items,modifies the list as a whole, rather than each member of the list (e.g.,each item). The phrase “at least one of” does not require selection ofat least one item; rather, the phrase allows a meaning that includes atleast one of any one of the items, and/or at least one of anycombination of the items, and/or at least one of each of the items. Byway of example, the phrases “at least one of A, B, and C” or “at leastone of A, B, or C” each refer to only A, only B, or only C; anycombination of A, B, and C; and/or at least one of each of A, B, and C.

The word “exemplary” is used herein to mean “serving as an example,instance, or illustration.” Any embodiment described herein as“exemplary” is not necessarily to be construed as preferred oradvantageous over other embodiments. Phrases such as an aspect, theaspect, another aspect, some aspects, one or more aspects, animplementation, the implementation, another implementation, someimplementations, one or more implementations, an embodiment, theembodiment, another embodiment, some embodiments, one or moreembodiments, a configuration, the configuration, another configuration,some configurations, one or more configurations, the subject technology,the disclosure, the present disclosure, and other variations thereof andalike are for convenience and do not imply that a disclosure relating tosuch phrase(s) is essential to the subject technology or that suchdisclosure applies to all configurations of the subject technology. Adisclosure relating to such phrase(s) may apply to all configurations,or one or more configurations. A disclosure relating to such phrase(s)may provide one or more examples. A phrase such as an aspect or someaspects may refer to one or more aspects and vice versa, and thisapplies similarly to other foregoing phrases.

A reference to an element in the singular is not intended to mean “oneand only one” unless specifically stated, but rather “one or more.” Theterm “some” refers to one or more. Underlined and/or italicized headingsand subheadings are used for convenience only, do not limit the subjecttechnology, and are not referred to in connection with theinterpretation of the description of the subject technology. Relationalterms such as first and second and the like may be used to distinguishone entity or action from another without necessarily requiring orimplying any actual such relationship or order between such entities oractions. All structural and functional equivalents to the elements ofthe various configurations described throughout this disclosure that areknown or later come to be known to those of ordinary skill in the artare expressly incorporated herein by reference and intended to beencompassed by the subject technology. Moreover, nothing disclosedherein is intended to be dedicated to the public, regardless of whethersuch disclosure is explicitly recited in the above description. Noclause element is to be construed under the provisions of 35 U.S.C. §112, sixth paragraph, unless the element is expressly recited using thephrase “means for” or, in the case of a method clause, the element isrecited using the phrase “step for.”

While this specification contains many specifics, these should not beconstrued as limitations on the scope of what may be described, butrather as descriptions of particular implementations of the subjectmatter. Certain features that are described in this specification in thecontext of separate embodiments can also be implemented in combinationin a single embodiment. Conversely, various features that are describedin the context of a single embodiment can also be implemented inmultiple embodiments separately or in any suitable subcombination.Moreover, although features may be described above as acting in certaincombinations and even initially described as such, one or more featuresfrom a described combination can in some cases be excised from thecombination, and the described combination may be directed to asubcombination or variation of a subcombination.

The subject matter of this specification has been described in terms ofparticular aspects, but other aspects can be implemented and are withinthe scope of the following clauses. For example, while operations aredepicted in the drawings in a particular order, this should not beunderstood as requiring that such operations be performed in theparticular order shown or in sequential order, or that all illustratedoperations be performed, to achieve desirable results. The actionsrecited in the clauses can be performed in a different order and stillachieve desirable results. As one example, the processes depicted in theaccompanying figures do not necessarily require the particular ordershown, or sequential order, to achieve desirable results. In certaincircumstances, multitasking and parallel processing may be advantageous.Moreover, the separation of various system components in the aspectsdescribed above should not be understood as requiring such separation inall aspects, and it should be understood that the described programcomponents and systems can generally be integrated together in a singlesoftware product or packaged into multiple software products.

The title, background, brief description of the drawings, abstract, anddrawings are hereby incorporated into the disclosure and are provided asillustrative examples of the disclosure, not as restrictivedescriptions. It is submitted with the understanding that they will notbe used to limit the scope or meaning of the clauses. In addition, inthe detailed description, it can be seen that the description providesillustrative examples and the various features are grouped together invarious implementations for the purpose of streamlining the disclosure.The method of disclosure is not to be interpreted as reflecting anintention that the described subject matter requires more features thanare expressly recited in each clause. Rather, as the clauses reflect,inventive subject matter lies in less than all features of a singledisclosed configuration or operation. The clauses are herebyincorporated into the detailed description, with each clause standing onits own as a separately described subject matter.

The clauses are not intended to be limited to the aspects describedherein, but are to be accorded the full scope consistent with thelanguage clauses and to encompass all legal equivalents.Notwithstanding, none of the clauses are intended to embrace subjectmatter that fails to satisfy the requirements of the applicable patentlaw, nor should they be interpreted in such a way.

1. A computer-implemented method for smart contract execution on ablockchain, comprising: identifying, for a developer of a blockchainapplication accessed by a block producer, a language used by thedeveloper, wherein the blockchain application is hosted by a server asan immutable register in a suite of virtual machine containers;searching, for the developer, a virtual machine container that runs anexecution environment associated with the language used by thedeveloper; selecting, from a search result, the virtual machinecontainer that runs an execution environment associated with thelanguage used by the developer; enabling one or more functions in thevirtual machine container to access a dedicated memory or a statevariable in the block producer to run an action in the virtual machinecontainer, the action provided by a server running the blockchainapplication for allowing the server to access the dedicated memory orthe state variable from the one or more functions of the blockchainapplication executable in the virtual machine container provided by theserver; providing the action to the blockchain application in thevirtual machine container; preventing access to the blockchainapplication with a security feature in an associated virtual machinecontainer; and directing the developer to the virtual machine containerthat runs the execution environment associated with the language used bythe developer.
 2. The computer-implemented method of claim 1, whereinidentifying a language used by the developer comprises detecting in acode script from the developer a sequence comprising one or morecharacters for at least one of a Java VM execution environment, a C++execution environment, and a Linux executable environment.
 3. Thecomputer-implemented method of claim 1, wherein the executionenvironment associated with the language used by the developer comprisesone or more versions of a same execution environment.
 4. Thecomputer-implemented method of claim 1, wherein enabling one or morefunctions to access a dedicated memory space comprises executing asoftware development kit to access the state variable and a libraryaccessible to the developer of the blockchain application.
 5. Thecomputer-implemented method of claim 1, further comprising preventingaccess to the blockchain application by a third party with a securityfeature in the virtual machine container.
 6. The computer-implementedmethod of claim 1, wherein selecting a virtual machine that runs anexecution environment associated with the language used by the developercomprises detecting the execution environment from a format of a headerin a code script provided by the developer.
 7. The computer-implementedmethod of claim 1, wherein selecting a virtual machine container thatruns an execution environment selected by the developer of theblockchain application comprises selecting the virtual machine containerthat runs an updated version of the execution environment associatedwith the language used by the developer.
 8. The computer-implementedmethod of claim 1, further comprising configuring a virtual machinecontainer to run an execution environment associated with the languageused by the developer.
 9. The computer-implemented method of claim 1,further comprising allowing a server to access an updated value of thestate variable from the blockchain application.
 10. A system for smartcontract execution on a blockchain, comprising: a memory configured tostore instructions; and one or more hardware processors configured toexecute the instructions to cause the system to: identify, for adeveloper of a blockchain application accessed by a block producer, alanguage used by the developer, wherein the blockchain application ishosted by a server as an immutable register in a suite of virtualmachine containers; search, for the developer, a virtual machinecontainer that runs an execution environment associated with thelanguage used by the developer; select, from a search result, thevirtual machine container that runs an execution environment associatedwith the language used by the developer; enable one or more functions inthe virtual machine container to access a dedicated memory or a statevariable in the block producer to run an action in the virtual machinecontainer, the action provided by a server running the blockchainapplication to allow the server to access the dedicated memory or thestate variable from the one or more functions of the blockchainapplication executable in the virtual machine container provided by theserver; provide the action to the blockchain application in the virtualmachine container; prevent access to the blockchain application with asecurity feature in an associated virtual machine container; and directthe developer to the virtual machine container that runs the executionenvironment associated with the language used by the developer.
 11. Thesystem of claim 10, wherein the execution environment associated withthe language used by the developer comprises one or more versions of asame execution environment.
 12. The system of claim 10, wherein enablingone or more functions to access a dedicated memory space comprisesexecuting a software development kit to access the state variable and alibrary accessible to the developer of the blockchain application. 13.The system of claim 10, further comprising preventing access to theblockchain application by a third party with a security feature in thevirtual machine container.
 14. The system of claim 10, wherein selectinga virtual machine that runs an execution environment associated with thelanguage used by the developer comprises detecting the executionenvironment from a format of a header in a code script provided by thedeveloper.
 15. A non-transitory, computer-readable storage mediumstoring instructions which, when executed by a hardware processor, causea computer to perform a method for smart contract execution on ablockchain, the method comprising: identifying, for a developer of ablockchain application accessed by a block producer, a language used bythe developer, wherein the blockchain application is hosted by a serveras an immutable register in a suite of virtual machine containers;searching, for the developer, a virtual machine container that runs anexecution environment associated with the language used by thedeveloper; selecting, from a search result, the virtual machinecontainer that runs an execution environment associated with thelanguage used by the developer; enabling one or more functions in thevirtual machine container to access a dedicated memory or a statevariable in the block producer to run an action in the virtual machinecontainer, the action provided by a server running the blockchainapplication for allowing the server to access the dedicated memory orthe state variable from the one or more functions of the blockchainapplication executable in the virtual machine container provided by theserver; providing the action to the blockchain application in thevirtual machine container; preventing access to the blockchainapplication with a security feature in an associated virtual machinecontainer; and directing the developer to the virtual machine containerthat runs the execution environment associated with the language used bythe developer.
 16. The non-transitory, computer-readable medium of claim15, wherein the execution environment associated with the language usedby the developer comprises one or more versions of a same executionenvironment.
 17. The non-transitory, computer-readable medium of claim15, wherein, in the method, enabling one or more functions to access adedicated memory space comprises executing a software development kit toaccess the state variable and a library accessible to the developer ofthe blockchain application.
 18. The non-transitory, computer-readablemedium of claim 15, wherein the method further comprises preventingaccess to the blockchain application by a third party with a securityfeature in the virtual machine container.
 19. The non-transitory,computer-readable medium of claim 15, wherein, in the method, selectinga virtual machine that runs an execution environment associated with thelanguage used by the developer comprises detecting the executionenvironment from a format of a header in a code script provided by thedeveloper.
 20. The non-transitory, computer-readable medium of claim 15,wherein the method further comprises configuring a virtual machinecontainer to run an execution environment associated with the languageused by the developer.